﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for SavingApplicant
/// </summary>
public class SavingApplicantDAL
{
	public SavingApplicantDAL()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public DataSet getApplicantList()
    {

        SqlConnection con = DBManager.getSqlConnection();

        String sql = "SELECT [accountNo], [custID], [balance], [interestRate], CONVERT(nvarchar(20),effectiveDate,103) AS effectiveDate, [savingType] FROM [SAVING_ACCOUNT]";
        SqlCommand cmd = new SqlCommand(sql, con);


        SqlDataAdapter myAdapter = new SqlDataAdapter(cmd);

        DataSet myDs = new DataSet();

        con.Open();
        myAdapter.Fill(myDs);

        con.Close();
        return myDs;


    }
}